﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common.Net.Exceptions;

namespace Common.Net.Utilities
{
    public static class ExceptionFactory
    {
        public static ArgumentException Argument(string format, params object[] args)
        {
            return new ArgumentException(string.Format(format, args));
        }

        public static MultiException Multi(IEnumerable<Exception> exceptions)
        {
            return new MultiException(exceptions);
        }

        public static NotSupportedException NotSupported(string format, params object[] args)
        {
            throw new NotImplementedException(string.Format(format, args));
        }
        
        public static InvalidOperationException InvalidOperation(string format, params object[] args)
        {
        	return new InvalidOperationException(string.Format(format, args));
        }
    }
}